import request from '@/sheep/request';

const DiyApi = {
  // source 1H5，2小程序，3安卓，4IOS
  // name ，1童行者-普通用户端，2童行者-主理人端  
  getUsedDiyTemplate: (source = 1, name = 2) => {
    return request({
      url: '/promotion/diy-template/used',
      method: 'GET',
      params: {
        source,
        name
      },
      custom: {
        showError: false,
        showLoading: false,
      },
    });
  },
  getDiyTemplate: (id) => {
    return request({
      url: '/promotion/diy-template/get',
      method: 'GET',
      params: {
        id
      },
      custom: {
        showError: false,
        showLoading: false,
      },
    });
  },
  getDiyPage: (id) => {
    return request({
      url: '/promotion/diy-page/get',
      method: 'GET',
      params: {
        id
      }
    });
  },
};

export default DiyApi;